
proc slices*(series: string, num: int): seq[string] = 
  if num notin 1..series.len:
    raise newException(ValueError, "slice length")

  for i in 0..series.len - num:
    result.add series[i..<i+num]